namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0015 : DbMigration
    {
        public override void Up()
        {
            RenameTable(name: "dbo.FimMasBankBranch", newName: "fim_mas_bank_branchs");
            RenameTable(name: "dbo.FimMasBank", newName: "fim_mas_banks");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "BranchId", newName: "branch_seq");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "Code", newName: "branch_id");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "BranchName", newName: "branch_name");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "BranchNameEng", newName: "branch_name_eng");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "BankId", newName: "bank_seq");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "RecordStatus", newName: "record_status");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "CreatedBy", newName: "created_by");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "CreatedWhen", newName: "created_when");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "UpdatedBy", newName: "updated_by");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "UpdatedWhen", newName: "updated_when");
            RenameColumn(table: "dbo.fim_mas_banks", name: "BankId", newName: "bank_seq");
            RenameColumn(table: "dbo.fim_mas_banks", name: "Code", newName: "bank_id");
            RenameColumn(table: "dbo.fim_mas_banks", name: "Name", newName: "bank_name");
            RenameColumn(table: "dbo.fim_mas_banks", name: "NameEng", newName: "bank_name_eng");
            RenameColumn(table: "dbo.fim_mas_banks", name: "RecordStatus", newName: "record_status");
            RenameColumn(table: "dbo.fim_mas_banks", name: "CreatedBy", newName: "created_by");
            RenameColumn(table: "dbo.fim_mas_banks", name: "CreatedWhen", newName: "created_when");
            RenameColumn(table: "dbo.fim_mas_banks", name: "UpdatedBy", newName: "updated_by");
            RenameColumn(table: "dbo.fim_mas_banks", name: "UpdatedWhen", newName: "updated_when");
        }
        
        public override void Down()
        {
            RenameColumn(table: "dbo.fim_mas_banks", name: "updated_when", newName: "UpdatedWhen");
            RenameColumn(table: "dbo.fim_mas_banks", name: "updated_by", newName: "UpdatedBy");
            RenameColumn(table: "dbo.fim_mas_banks", name: "created_when", newName: "CreatedWhen");
            RenameColumn(table: "dbo.fim_mas_banks", name: "created_by", newName: "CreatedBy");
            RenameColumn(table: "dbo.fim_mas_banks", name: "record_status", newName: "RecordStatus");
            RenameColumn(table: "dbo.fim_mas_banks", name: "bank_name_eng", newName: "NameEng");
            RenameColumn(table: "dbo.fim_mas_banks", name: "bank_name", newName: "Name");
            RenameColumn(table: "dbo.fim_mas_banks", name: "bank_id", newName: "Code");
            RenameColumn(table: "dbo.fim_mas_banks", name: "bank_seq", newName: "BankId");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "updated_when", newName: "UpdatedWhen");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "updated_by", newName: "UpdatedBy");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "created_when", newName: "CreatedWhen");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "created_by", newName: "CreatedBy");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "record_status", newName: "RecordStatus");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "bank_seq", newName: "BankId");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "branch_name_eng", newName: "BranchNameEng");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "branch_name", newName: "BranchName");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "branch_id", newName: "Code");
            RenameColumn(table: "dbo.fim_mas_bank_branchs", name: "branch_seq", newName: "BranchId");
            RenameTable(name: "dbo.fim_mas_banks", newName: "FimMasBank");
            RenameTable(name: "dbo.fim_mas_bank_branchs", newName: "FimMasBankBranch");
        }
    }
}
